unit UCadGrupo;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Modelo, DB, DBTables, Grids, DBGrids, StdCtrls, Buttons,
  CheckLst, ExtCtrls, Mask, DBCtrls, UDPTOUteis;

type
  TFCadGrupo = class(TFModelo)
    qPadraoGRUDESCRICAO: TStringField;
    qPadraoIDGRUPO: TIntegerField;
    lbl1: TLabel;
    dbedt1: TDBEdit;
    lbl2: TLabel;
    dbedt2: TDBEdit;
    procedure qPadraoAfterInsert(DataSet: TDataSet);
    procedure BtNovoClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FCadGrupo: TFCadGrupo;

implementation

{$R *.dfm}

procedure TFCadGrupo.qPadraoAfterInsert(DataSet: TDataSet);
begin
  inherited;
  qPadrao.FieldByName('IDGRUPO').AsInteger := DPTOProximo('GRUPO');
end;

procedure TFCadGrupo.BtNovoClick(Sender: TObject);
begin
  inherited;
  dbedt1.SetFocus;
end;

end.
